#tag Class
Class NSAttributedString
Inherits NSObject
	#tag Method, Flags = &h1000
		Function BlockRange(block as NSTextBlock, location as UInt32) As Cocoa.NSRange
		  
		  #if targetMacOS
		    declare function rangeOfTextBlock lib CocoaLib selector "rangeOfTextBlock:atIndex:" _
		    (obj_id as Ptr, block as Ptr, location as UInt32) as Cocoa.NSRange
		    
		    dim blockRef as Ptr
		    if block <> nil then
		      blockRef = block
		    end if
		    
		    return rangeOfTextBlock(self, blockRef, location)
		    
		  #else
		    #pragma unused block
		    #pragma unused location
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function BoundingRect(size as Cocoa.NSSize, options as Integer) As Cocoa.NSRect
		  
		  #if targetMacOS
		    declare function boundingRectWithSize lib CocoaLib selector "boundingRectWithSize:options:" _
		    (obj_id as Ptr, size as Cocoa.NSSize, options as Integer) as Cocoa.NSRect
		    
		    return boundingRectWithSize(self, size, options)
		    
		  #else
		    #pragma unused size
		    #pragma unused options
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h21
		Private Shared Function ClassRef() As Ptr
		  
		  static ref as Ptr = Cocoa.NSClassFromString("NSAttributedString")
		  return ref
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Sub Constructor(aString as NSAttributedString)
		  
		  #if targetMacOS
		    declare function initWithAttributedString lib CocoaLib selector "initWithAttributedString:" (obj_id as Ptr, aString as Ptr) as Ptr
		    
		    dim stringRef as Ptr
		    if aString <> nil then
		      stringRef = aString
		    end if
		    
		    super.Constructor(initWithAttributedString(Allocate("NSAttributedString"), stringRef), NSAttributedString.hasOwnership)
		    
		  #else
		    #pragma unused aString
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1000
		Sub Constructor(data as NSData, options as NSDictionary, byRef docAttributes as NSDictionary, byRef error as NSError)
		  
		  #if targetMacOS
		    declare function initWithData lib CocoaLib selector "initWithData:options:documentAttributes:error:" _
		    (obj_id as Ptr, data as Ptr, options as Ptr, byRef docAttributes as Ptr, byRef error as Ptr) as Ptr
		    
		    dim dataRef as Ptr
		    if data <> nil then
		      dataRef = data
		    end if
		    
		    dim optionsRef as Ptr
		    if options <> nil then
		      optionsRef = options
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim errorRef as Ptr
		    
		    super.Constructor(initWithData(Allocate("NSAttributedString"), dataRef, optionsRef, docAttributesRef, errorRef), NSAttributedString.hasOwnership)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if errorRef <> nil then
		      error = new NSError(errorRef)
		    end if
		    
		  #else
		    #pragma unused data
		    #pragma unused options
		    #pragma unused docAttributes
		    #pragma unused error
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1000
		Sub Constructor(aString as String)
		  
		  #if targetMacOS
		    declare function initWithString lib CocoaLib selector "initWithString:" (obj_id as Ptr, aString as CFStringRef) as Ptr
		    
		    super.Constructor(initWithString(Allocate("NSAttributedString"), aString), NSAttributedString.hasOwnership)
		    
		  #else
		    #pragma unused aString
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1000
		Sub Constructor(aString as String, attribs as NSDictionary)
		  
		  #if targetMacOS
		    declare function initWithString lib CocoaLib selector "initWithString:attributes:" (obj_id as Ptr, aString as CFStringRef, attribs as Ptr) as Ptr
		    
		    dim attribsRef as Ptr
		    if attribs <> nil then
		      attribsRef = attribs
		    end if
		    
		    super.Constructor(initWithString(Allocate("NSAttributedString"), aString, attribsRef), NSAttributedString.hasOwnership)
		    
		  #else
		    #pragma unused aString
		    #pragma unused attribs
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function ContainsAttachments() As Boolean
		  
		  #if targetMacOS
		    declare function containsAttachments lib CocoaLib selector "containsAttachments" (obj_id as Ptr) as Boolean
		    
		    return containsAttachments(self)
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateFromAttachment(attachment as NSTextAttachment) As NSAttributedString
		  
		  #if TargetMacOS
		    declare function attributedStringWithAttachment lib CocoaLib selector "attributedStringWithAttachment:" (class_id as Ptr, attachment as Ptr) as Ptr
		    
		    dim attachmentRef as Ptr
		    if attachment <> nil then
		      attachmentRef = attachment
		    end if
		    
		    dim stringRef as Ptr = attributedStringWithAttachment(ClassRef, attachmentRef)
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef)
		    end if
		    
		  #else
		    #pragma unused attachment
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithDocFormat(data as NSData, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithDocFormat lib CocoaLib selector "initWithDocFormat:documentAttributes:" _
		    (obj_id as Ptr, data as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim dataRef as Ptr
		    if data <> nil then
		      dataRef = data
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithDocFormat(Allocate("NSAttributedString"), dataRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused data
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithFile(file as FolderItem, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithPath lib CocoaLib selector "initWithPath:documentAttributes:" _
		    (obj_id as Ptr, path as CFStringRef, byRef docAttributes as Ptr) as Ptr
		    
		    if file <> nil then
		      dim docAttributesRef as Ptr
		      if docAttributes <> nil then
		        docAttributesRef = docAttributes
		      end if
		      
		      dim stringRef as Ptr = initWithPath(Allocate("NSAttributedString"), file.POSIXPath, docAttributesRef)
		      
		      if docAttributesRef <> nil then
		        docAttributes = new NSDictionary(docAttributesRef)
		      end if
		      
		      if stringRef <> nil then
		        return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		      end if
		    end if
		    
		  #else
		    #pragma unused file
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithHTML(data as NSData, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithHTML lib CocoaLib selector "initWithHTML:documentAttributes:" _
		    (obj_id as Ptr, data as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim dataRef as Ptr
		    if data <> nil then
		      dataRef = data
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithHTML(Allocate("NSAttributedString"), dataRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused data
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithHTML(data as NSData, options as NSDictionary, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithHTML lib CocoaLib selector "initWithHTML:options:documentAttributes:" _
		    (obj_id as Ptr, data as Ptr, options as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim dataRef as Ptr
		    if data <> nil then
		      dataRef = data
		    end if
		    
		    dim optionsRef as Ptr
		    if options <> nil then
		      optionsRef = options
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithHTML(Allocate("NSAttributedString"), dataRef, optionsRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused data
		    #pragma unused options
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithHTML(data as NSData, baseURL as NSURL, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithHTML lib CocoaLib selector "initWithHTML:baseURL:documentAttributes:" _
		    (obj_id as Ptr, data as Ptr, baseURL as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim dataRef as Ptr
		    if data <> nil then
		      dataRef = data
		    end if
		    
		    dim urlRef as Ptr
		    if baseURL <> nil then
		      urlRef = baseURL
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithHTML(Allocate("NSAttributedString"), dataRef, urlRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused data
		    #pragma unused baseURL
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithRTF(data as NSData, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithRTF lib CocoaLib selector "initWithRTF:documentAttributes:" _
		    (obj_id as Ptr, data as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim dataRef as Ptr
		    if data <> nil then
		      dataRef = data
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithRTF(Allocate("NSAttributedString"), dataRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused data
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithRTFD(data as NSData, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithRTFD lib CocoaLib selector "initWithRTFD:documentAttributes:" _
		    (obj_id as Ptr, data as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim dataRef as Ptr
		    if data <> nil then
		      dataRef = data
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithRTFD(Allocate("NSAttributedString"), dataRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused data
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithRTFD(wrapper as NSFileWrapper, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithRTFDFileWrapper lib CocoaLib selector "initWithRTFDFileWrapper:documentAttributes:" _
		    (obj_id as Ptr, wrapper as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim wrapperRef as Ptr
		    if wrapper <> nil then
		      wrapperRef = wrapper
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithRTFDFileWrapper(Allocate("NSAttributedString"), wrapperRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused wrapper
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithURL(aURL as NSURL, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithURL lib CocoaLib selector "initWithURL:documentAttributes:" _
		    (obj_id as Ptr, aURL as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim urlRef as Ptr
		    if aURL <> nil then
		      urlRef = aURL
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithURL(Allocate("NSAttributedString"), urlRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused aURL
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function CreateWithURL(aURL as NSURL, options as NSDictionary, byRef docAttributes as NSDictionary) As NSAttributedString
		  
		  #if targetMacOS
		    declare function initWithURL lib CocoaLib selector "initWithURL:options:documentAttributes:error:" _
		    (obj_id as Ptr, aURL as Ptr, options as Ptr, byRef docAttributes as Ptr) as Ptr
		    
		    dim urlRef as Ptr
		    if aURL <> nil then
		      urlRef = aURL
		    end if
		    
		    dim optionsRef as Ptr
		    if options <> nil then
		      optionsRef = options
		    end if
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim stringRef as Ptr = initWithURL(Allocate("NSAttributedString"), urlRef, optionsRef, docAttributesRef)
		    
		    if docAttributesRef <> nil then
		      docAttributes = new NSDictionary(docAttributesRef)
		    end if
		    
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef, NSAttributedString.hasOwnership)
		    end if
		    
		  #else
		    #pragma unused aURL
		    #pragma unused options
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function Data(aRange as Cocoa.NSRange, docAttributes as NSDictionary, byRef error as NSError) As NSData
		  
		  #if targetMacOS
		    declare function dataFromRange lib CocoaLib selector "dataFromRange:documentAttributes:error:" _
		    (obj_id as Ptr, aRange as Cocoa.NSRange, docAttributes as Ptr, byRef error as Ptr) as Ptr
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim errorRef as Ptr
		    
		    dim dataRef as Ptr = dataFromRange(self, aRange, docAttributesRef, errorRef)
		    
		    if errorRef <> nil then
		      error = new NSError(errorRef)
		    end if
		    
		    if dataRef <> nil then
		      return new NSData(dataRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		    #pragma unused docAttributes
		    #pragma unused error
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function DocFormat(aRange as Cocoa.NSRange, docAttributes as NSDictionary) As NSData
		  
		  #if targetMacOS
		    declare function docFormatFromRange lib CocoaLib selector "docFormatFromRange:documentAttributes:" _
		    (obj_id as Ptr, aRange as Cocoa.NSRange, docAttributes as Ptr) as Ptr
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim dataRef as Ptr = docFormatFromRange(self, aRange, docAttributesRef)
		    
		    if dataRef <> nil then
		      return new NSData(dataRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function DoubleClickRange(index as UInt32) As Cocoa.NSRange
		  
		  #if targetMacOS
		    declare function doubleClickAtIndex lib CocoaLib selector "doubleClickAtIndex:" (obj_id as Ptr, index as UInt32) as Cocoa.NSRange
		    
		    return doubleClickAtIndex(self, index)
		    
		  #else
		    #pragma unused index
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Sub Draw(point as Cocoa.NSPoint)
		  
		  #if targetMacOS
		    declare sub drawAtPoint lib CocoaLib selector "drawAtPoint:" (obj_id as Ptr, point as Cocoa.NSPoint)
		    
		    drawAtPoint self, point
		    
		  #else
		    #pragma unused point
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1000
		Sub Draw(rect as Cocoa.NSRect)
		  
		  #if targetMacOS
		    declare sub drawInRect lib CocoaLib selector "drawInRect:" (obj_id as Ptr, rect as Cocoa.NSRect)
		    
		    drawInRect self, rect
		    
		  #else
		    #pragma unused rect
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1000
		Sub Draw(rect as Cocoa.NSRect, options as Integer)
		  
		  #if targetMacOS
		    declare sub drawWithRect lib CocoaLib selector "drawWithRect:options:" (obj_id as Ptr, rect as Cocoa.NSRect, options as Integer)
		    
		    drawWithRect self, rect, options
		    
		  #else
		    #pragma unused rect
		    #pragma unused options
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function FileWrapper(aRange as Cocoa.NSRange, docAttributes as NSDictionary, byRef error as NSError) As NSFileWrapper
		  
		  #if targetMacOS
		    declare function fileWrapperFromRange lib CocoaLib selector "fileWrapperFromRange:documentAttributes:error:" _
		    (obj_id as Ptr, aRange as Cocoa.NSRange, docAttributes as Ptr, byRef error as Ptr) as Ptr
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim errorRef as Ptr
		    
		    dim wrapperRef as Ptr = fileWrapperFromRange(self, aRange, docAttributesRef, errorRef)
		    
		    if errorRef <> nil then
		      error = new NSError(errorRef)
		    end if
		    
		    if wrapperRef <> nil then
		      return new NSFileWrapper(wrapperRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		    #pragma unused docAttributes
		    #pragma unused error
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function FontAttributes(aRange as Cocoa.NSRange) As NSDictionary
		  
		  #if targetMacOS
		    declare function fontAttributesInRange lib CocoaLib selector "fontAttributesInRange:" (obj_id as Ptr, aRange as Cocoa.NSRange) as Ptr
		    
		    dim dictRef as Ptr = fontAttributesInRange(self, aRange)
		    if dictRef <> nil then
		      return new NSDictionary(dictRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function GetURL(location as UInt32, byRef effectiveRange as Cocoa.NSRange) As NSURL
		  
		  #if targetMacOS
		    declare function URLAtIndex lib CocoaLib selector "URLAtIndex:effectiveRange:" _
		    (obj_id as Ptr, location as UInt32, byRef aRangePointer as Cocoa.NSRange) as Ptr
		    
		    dim urlRef as Ptr = URLAtIndex(self, location, effectiveRange)
		    if urlRef <> nil then
		      return new NSURL(urlRef)
		    end if
		    
		  #else
		    #pragma unused location
		    #pragma unused effectiveRange
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function IsEqual(otherString as NSAttributedString) As Boolean
		  
		  #if targetMacOS
		    declare function isEqualToAttributedString lib CocoaLib selector "isEqualToAttributedString:" (obj_id as Ptr, otherString as Ptr) as Boolean
		    
		    dim otherStringRef as Ptr
		    if otherString <> nil then
		      otherStringRef = otherString
		    end if
		    
		    return isEqualToAttributedString(self, otherStringRef)
		    
		  #else
		    #pragma unused otherString
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function ListIndex(aList as NSTextList, location as UInt32) As Integer
		  
		  #if targetMacOS
		    declare function itemNumberInTextList lib CocoaLib selector "itemNumberInTextList:atIndex:" _
		    (obj_id as Ptr, aList as Ptr, location as UInt32) as Integer
		    
		    dim listRef as Ptr
		    if aList <> nil then
		      listRef = aList
		    end if
		    
		    return itemNumberInTextList(self, listRef, location)
		    
		  #else
		    #pragma unused aList
		    #pragma unused location
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function ListRange(aList as NSTextList, location as UInt32) As Cocoa.NSRange
		  
		  #if targetMacOS
		    declare function rangeOfTextList lib CocoaLib selector "rangeOfTextList:atIndex:" _
		    (obj_id as Ptr, aList as Ptr, location as UInt32) as Cocoa.NSRange
		    
		    dim listRef as Ptr
		    if aList <> nil then
		      listRef = aList
		    end if
		    
		    return rangeOfTextList(self, listRef, location)
		    
		  #else
		    #pragma unused aList
		    #pragma unused location
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function NextWord(index as UInt32, forward as Boolean) As UInt32
		  
		  #if targetMacOS
		    declare function nextWordFromIndex lib CocoaLib selector "nextWordFromIndex:forward:" _
		    (obj_id as Ptr, index as UInt32, forward as Boolean) as UInt32
		    
		    return nextWordFromIndex(self, index, forward)
		    
		  #else
		    #pragma unused index
		    #pragma unused forward
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSAttachmentAttributeName() As String
		  
		  return Cocoa.StringConstant("NSAttachmentAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSAuthorDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSAuthorDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSBackgroundColorAttributeName() As String
		  
		  return Cocoa.StringConstant("NSBackgroundColorAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSBackgroundColorDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSBackgroundColorDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSBaselineOffsetAttributeName() As String
		  
		  return Cocoa.StringConstant("NSBaselineOffsetAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSBaseURLDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSBaseURLDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSBottomMarginDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSBottomMarginDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCategoryDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSCategoryDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCharacterEncodingDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSCharacterEncodingDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCharacterEncodingDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSCharacterEncodingDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCharacterShapeAttributeName() As String
		  
		  return Cocoa.StringConstant("NSCharacterShapeAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCocoaVersionDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSCocoaVersionDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCommentDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSCommentDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCompanyDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSCompanyDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSConvertedDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSConvertedDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCopyrightDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSCopyrightDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCreationTimeDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSCreationTimeDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSCursorAttributeName() As String
		  
		  return Cocoa.StringConstant("NSCursorAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSDefaultAttributesDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSDefaultAttributesDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSDefaultTabIntervalDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSDefaultTabIntervalDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSDocFormatTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSDocFormatTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSDocumentTypeDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSDocumentTypeDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSDocumentTypeDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSDocumentTypeDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSEditorDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSEditorDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSExcludedElementsDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSExcludedElementsDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSExpansionAttributeName() As String
		  
		  return Cocoa.StringConstant("NSExpansionAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSFileTypeDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSFileTypeDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSFileTypeDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSFileTypeDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSFontAttributeName() As String
		  
		  return Cocoa.StringConstant("NSFontAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSForegroundColorAttributeName() As String
		  
		  return Cocoa.StringConstant("NSForegroundColorAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSGlyphInfoAttributeName() As String
		  
		  return Cocoa.StringConstant("NSGlyphInfoAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSHTMLTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSHTMLTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSHyphenationFactorDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSHyphenationFactorDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSKernAttributeName() As String
		  
		  return Cocoa.StringConstant("NSKernAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSKeywordsDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSKeywordsDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSLeftMarginDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSLeftMarginDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSLigatureAttributeName() As String
		  
		  return Cocoa.StringConstant("NSLigatureAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSLinkAttributeName() As String
		  
		  return Cocoa.StringConstant("NSLinkAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSMacSimpleTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSMacSimpleTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSManagerDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSManagerDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSMarkedClauseSegmentAttributeName() As String
		  
		  return Cocoa.StringConstant("NSMarkedClauseSegmentAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSModificationTimeDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSModificationTimeDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSObliquenessAttributeName() As String
		  
		  return Cocoa.StringConstant("NSObliquenessAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSOfficeOpenXMLTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSOfficeOpenXMLTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSOpenDocumentTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSOpenDocumentTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSPaperSizeDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSPaperSizeDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSParagraphStyleAttributeName() As String
		  
		  return Cocoa.StringConstant("NSParagraphStyleAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSPlainTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSPlainTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSPrefixSpacesDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSPrefixSpacesDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSReadOnlyDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSReadOnlyDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSRightMarginDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSRightMarginDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSRTFDTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSRTFDTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSRTFTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSRTFTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSShadowAttributeName() As String
		  
		  return Cocoa.StringConstant("NSShadowAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSSpellingStateAttributeName() As String
		  
		  return Cocoa.StringConstant("NSSpellingStateAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSStrikethroughColorAttributeName() As String
		  
		  return Cocoa.StringConstant("NSStrikethroughColorAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSStrikethroughStyleAttributeName() As String
		  
		  return Cocoa.StringConstant("NSStrikethroughStyleAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSStrokeColorAttributeName() As String
		  
		  return Cocoa.StringConstant("NSStrokeColorAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSStrokeWidthAttributeName() As String
		  
		  return Cocoa.StringConstant("NSStrokeWidthAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSSubjectDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSSubjectDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSSuperscriptAttributeName() As String
		  
		  return Cocoa.StringConstant("NSSuperscriptAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTextEncodingNameDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSTextEncodingNameDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTextEncodingNameDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSTextEncodingNameDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTextLayoutSectionOrientation() As String
		  
		  return Cocoa.StringConstant("NSTextLayoutSectionOrientation")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTextLayoutSectionRange() As String
		  
		  return Cocoa.StringConstant("NSTextLayoutSectionRange")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTextLayoutSectionsAttribute() As String
		  
		  return Cocoa.StringConstant("NSTextLayoutSectionsAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTextSizeMultiplierDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSTextSizeMultiplierDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTimeoutDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSTimeoutDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTitleDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSTitleDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSToolTipAttributeName() As String
		  
		  return Cocoa.StringConstant("NSToolTipAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSTopMarginDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSTopMarginDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlineColorAttributeName() As String
		  
		  return Cocoa.StringConstant("NSUnderlineColorAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlinePatternDash() As String
		  
		  return Cocoa.StringConstant("NSUnderlinePatternDash")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlinePatternDashDot() As String
		  
		  return Cocoa.StringConstant("NSUnderlinePatternDashDot")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlinePatternDashDotDot() As String
		  
		  return Cocoa.StringConstant("NSUnderlinePatternDashDotDot")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlinePatternDot() As String
		  
		  return Cocoa.StringConstant("NSUnderlinePatternDot")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlinePatternSolid() As String
		  
		  return Cocoa.StringConstant("NSUnderlinePatternSolid")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlineStyleAttributeName() As String
		  
		  return Cocoa.StringConstant("NSUnderlineStyleAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlineStyleDouble() As String
		  
		  return Cocoa.StringConstant("NSUnderlineStyleDouble")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlineStyleNone() As String
		  
		  return Cocoa.StringConstant("NSUnderlineStyleNone")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlineStyleSingle() As String
		  
		  return Cocoa.StringConstant("NSUnderlineStyleSingle")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSUnderlineStyleThick() As String
		  
		  return Cocoa.StringConstant("NSUnderlineStyleThick")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSVerticalGlyphFormAttributeName() As String
		  
		  return Cocoa.StringConstant("NSVerticalGlyphFormAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSViewModeDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSViewModeDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSViewSizeDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSViewSizeDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSViewZoomDocumentAttribute() As String
		  
		  return Cocoa.StringConstant("NSViewZoomDocumentAttribute")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSWebArchiveTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSWebArchiveTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSWebPreferencesDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSWebPreferencesDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSWebResourceLoadDelegateDocumentOption() As String
		  
		  return Cocoa.StringConstant("NSWebResourceLoadDelegateDocumentOption")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSWordMLTextDocumentType() As String
		  
		  return Cocoa.StringConstant("NSWordMLTextDocumentType")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSWritingDirectionAttributeName() As String
		  
		  return Cocoa.StringConstant("NSWritingDirectionAttributeName")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function PreviousHyphenation(index as UInt32, withinRange as Cocoa.NSRange) As UInt32
		  
		  #if targetMacOS
		    declare function lineBreakByHyphenatingBeforeIndex lib CocoaLib selector "lineBreakByHyphenatingBeforeIndex:withinRange:" _
		    (obj_id as Ptr, index as UInt32, aRange as Cocoa.NSRange) as UInt32
		    
		    return lineBreakByHyphenatingBeforeIndex(self, index, withinRange)
		    
		  #else
		    #pragma unused index
		    #pragma unused withinRange
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function PreviousLineBreak(index as UInt32, withinRange as Cocoa.NSRange) As UInt32
		  
		  #if targetMacOS
		    declare function lineBreakBeforeIndex lib CocoaLib selector "lineBreakBeforeIndex:withinRange:" _
		    (obj_id as Ptr, index as UInt32, aRange as Cocoa.NSRange) as UInt32
		    
		    return lineBreakBeforeIndex(self, index, withinRange)
		    
		  #else
		    #pragma unused index
		    #pragma unused withinRange
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function RTF(aRange as Cocoa.NSRange, docAttributes as NSDictionary) As NSData
		  
		  #if targetMacOS
		    declare function RTFFromRange lib CocoaLib selector "RTFFromRange:documentAttributes:" _
		    (obj_id as Ptr, aRange as Cocoa.NSRange, docAttributes as Ptr) as Ptr
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim dataRef as Ptr = RTFFromRange(self, aRange, docAttributesRef)
		    
		    if dataRef <> nil then
		      return new NSData(dataRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function RTFD(aRange as Cocoa.NSRange, docAttributes as NSDictionary) As NSData
		  
		  #if targetMacOS
		    declare function RTFDFromRange lib CocoaLib selector "RTFDFromRange:documentAttributes:" _
		    (obj_id as Ptr, aRange as Cocoa.NSRange, docAttributes as Ptr) as Ptr
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim dataRef as Ptr = RTFDFromRange(self, aRange, docAttributesRef)
		    
		    if dataRef <> nil then
		      return new NSData(dataRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function RTFDFileWrapper(aRange as Cocoa.NSRange, docAttributes as NSDictionary) As NSFileWrapper
		  
		  #if targetMacOS
		    declare function RTFDFileWrapperFromRange lib CocoaLib selector "RTFDFileWrapperFromRange:documentAttributes:" _
		    (obj_id as Ptr, aRange as Cocoa.NSRange, docAttributes as Ptr) as Ptr
		    
		    dim docAttributesRef as Ptr
		    if docAttributes <> nil then
		      docAttributesRef = docAttributes
		    end if
		    
		    dim wrapperRef as Ptr = RTFDFileWrapperFromRange(self, aRange, docAttributesRef)
		    
		    if wrapperRef <> nil then
		      return new NSFileWrapper(wrapperRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		    #pragma unused docAttributes
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function RulerAttributes(aRange as Cocoa.NSRange) As NSDictionary
		  
		  #if targetMacOS
		    declare function rulerAttributesInRange lib CocoaLib selector "rulerAttributesInRange:" (obj_id as Ptr, aRange as Cocoa.NSRange) as Ptr
		    
		    dim dictRef as Ptr = rulerAttributesInRange(self, aRange)
		    if dictRef <> nil then
		      return new NSDictionary(dictRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function Size() As Cocoa.NSSize
		  
		  #if targetMacOS
		    declare function size lib CocoaLib selector "size" (obj_id as Ptr) as Cocoa.NSSize
		    
		    return size(self)
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function StringAttribute(attributeName as String, index as UInt32, byRef effectiveRange as Cocoa.NSRange) As Ptr
		  
		  #if targetMacOS
		    declare function attribute_ lib CocoaLib selector "attribute:atIndex:effectiveRange:" _
		    (obj_id as Ptr, attributeName as CFStringRef, index as UInt32, byRef aRange as Cocoa.NSRange) as Ptr
		    
		    return attribute_(self, attributeName, index, effectiveRange)
		    
		  #else
		    #pragma unused attributeName
		    #pragma unused index
		    #pragma unused effectiveRange
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function StringAttribute(attributeName as String, index as UInt32, byRef longestEffectiveRange as Cocoa.NSRange, rangeLimit as Cocoa.NSRange) As Ptr
		  
		  #if targetMacOS
		    declare function attribute_ lib CocoaLib selector "attribute:atIndex:longestEffectiveRange:inRange:" _
		    (obj_id as Ptr, attributeName as CFStringRef, index as UInt32, byRef aRange as Cocoa.NSRange, rangeLimit as Cocoa.NSRange) as Ptr
		    
		    return attribute_(self, attributeName, index, longestEffectiveRange, rangeLimit)
		    
		  #else
		    #pragma unused attributeName
		    #pragma unused index
		    #pragma unused longestEffectiveRange
		    #pragma unused rangeLimit
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function StringAttributes(index as UInt32, byRef effectiveRange as Cocoa.NSRange) As NSDictionary
		  
		  #if targetMacOS
		    declare function attributesAtIndex lib CocoaLib selector "attributesAtIndex:effectiveRange:" (obj_id as Ptr, index as UInt32, byRef aRange as Cocoa.NSRange) as Ptr
		    
		    dim dictRef as Ptr = attributesAtIndex(self, index, effectiveRange)
		    if dictRef <> nil then
		      return new NSDictionary(dictRef)
		    end if
		    
		  #else
		    #pragma unused index
		    #pragma unused effectiveRange
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function StringAttributes(index as UInt32, byRef longestEffectiveRange as Cocoa.NSRange, rangeLimit as Cocoa.NSRange) As NSDictionary
		  
		  #if targetMacOS
		    declare function attributesAtIndex lib CocoaLib selector "attributesAtIndex:longestEffectiveRange:inRange:" _
		    (obj_id as Ptr, index as UInt32, byRef aRange as Cocoa.NSRange, rangeLimit as Cocoa.NSRange) as Ptr
		    
		    dim dictRef as Ptr = attributesAtIndex(self, index, longestEffectiveRange, rangeLimit)
		    if dictRef <> nil then
		      return new NSDictionary(dictRef)
		    end if
		    
		  #else
		    #pragma unused index
		    #pragma unused longestEffectiveRange
		    #pragma unused rangeLimit
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function Substring(aRange as NSRange) As NSAttributedString
		  
		  #if targetMacOS
		    declare function attributedSubstringFromRange lib CocoaLib selector "attributedSubstringFromRange:" _
		    (obj_id as Ptr, aRange as Cocoa.NSRange) as Ptr
		    
		    dim stringRef as Ptr = attributedSubstringFromRange(self, aRange)
		    if stringRef <> nil then
		      return new NSAttributedString(stringRef)
		    end if
		    
		  #else
		    #pragma unused aRange
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		Function TableRange(aTable as NSTextTable, location as UInt32) As Cocoa.NSRange
		  
		  #if targetMacOS
		    declare function rangeOfTextTable lib CocoaLib selector "rangeOfTextTable:atIndex:" _
		    (obj_id as Ptr, aTable as Ptr, location as UInt32) as Cocoa.NSRange
		    
		    dim tableRef as Ptr
		    if aTable <> nil then
		      tableRef = aTable
		    end if
		    
		    return rangeOfTextTable(self, tableRef, location)
		    
		  #else
		    #pragma unused aTable
		    #pragma unused location
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function TextTypes() As String()
		  
		  #if TargetMacOS
		    declare function textTypes lib CocoaLib selector "textTypes" (class_id as Ptr) as Ptr
		    
		    dim rb_array() as String
		    
		    dim arrayRef as Ptr = textTypes(ClassRef)
		    if arrayRef<> nil then
		      rb_array = new NSArray(arrayRef)
		    end if
		    
		    return rb_array
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h1000
		 Shared Function TextUnfilteredTypes() As String()
		  
		  #if TargetMacOS
		    declare function textUnfilteredTypes lib CocoaLib selector "textUnfilteredTypes" (class_id as Ptr) as Ptr
		    
		    dim rb_array() as String
		    
		    dim arrayRef as Ptr = textUnfilteredTypes(ClassRef)
		    if arrayRef<> nil then
		      rb_array = new NSArray(arrayRef)
		    end if
		    
		    return rb_array
		    
		  #endif
		  
		End Function
	#tag EndMethod


	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if TargetMacOS
			    declare function length lib CocoaLib selector "length" (obj_id as Ptr) as UInt32
			    
			    return length(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		Length As UInt32
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if TargetMacOS
			    declare function string_ lib CocoaLib selector "string" (obj_id as Ptr) as CFStringRef
			    
			    return string_(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		StringValue As String
	#tag EndComputedProperty


	#tag Constant, Name = NSSpellingStateGrammarFlag, Type = Double, Dynamic = False, Default = \"2", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSSpellingStateSpellingFlag, Type = Double, Dynamic = False, Default = \"1", Scope = Public
	#tag EndConstant


	#tag ViewBehavior
		#tag ViewProperty
			Name="Description"
			Group="Behavior"
			Type="String"
			EditorType="MultiLineEditor"
			InheritedFrom="NSObject"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Index"
			Visible=true
			Group="ID"
			InitialValue="-2147483648"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Left"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Name"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="StringValue"
			Group="Behavior"
			Type="String"
			EditorType="MultiLineEditor"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Super"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Top"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
	#tag EndViewBehavior
End Class
#tag EndClass
